# -*- coding: utf-8 -*-
'''
Created on 2012-9-29

@author: Leon
标签格式  AAA,BBB,CCC,
'''


class Firm(object):
    def __init__(self, row):
        self.id = row['id']#编号
        self.name = row['name']#企业名称
        self.fullName = row['fullName']#企业全名
        self.eName = row['eName']#企业英文名称
        logourl = row['logoUrl']
        self.logoUrl = row['logoUrl'] if ( logourl != '' and logourl != None) \
            else '/static/images/nologo.png'#logo地址
        self.homePage = row['homePage']#企业主页地址
        self.caption = row['caption']#详细说明
        self.tags = row['tags']#标签
        self.status = row['status']#状态
        self.latestUpdateTime = row['latestUpdateTime']#最近更新时间
        self.creationTime = row['creationTime']#创建时间


class Product(object):
    def __init__(self, row):
        self.id = row['id']#编号
        self.mark = row['mark']#标记
        self.name = row['name']#产品名称
        self.eName = row['eName']#产品英文名
        self.firmID = row['firmID']#产品所属企业编号
        self.firmName = row['firmName']#产品所属企业名称
        self.firmUrl = row['firmUrl']#产品所属企业名称
        self.categoryTags = row['categoryTags']#分类标签
        self.featureTags = row['featureTags']#功能标签
        self.logo = row['logo']#产品logo
        self.logoUrl = 'http://shared.b0.upaiyun.com/yml_p_logo/' + self.logo
        self.pageUrl = row['pageUrl']#产品地址
        self.captionHtml = row['captionHtml']#
        self.introHtml = row['introHtml']#简介
        self.detailHtml = row['detailHtml']#详细说明
        self.status = row['status']#状态
        self.lastUpdateTime = row['lastUpdateTime']#最近更新时间
        self.createTime = row['createTime']#创建时间


class Tag(object):
    def __init__(self, row):
        self.name = row['name']#标签名称
        self.count = row['count']#标签数量
        self.status = row['status']#标签状态
    
